/*
 * delay.c
 *
 *  Created on: Oct 21, 2023
 *      Author: jia
 */


#include"delay.h"

void delay_us(uint32_t us)
{
	uint32_t delay = (HAL_RCC_GetHCLKFreq()/(8000000 * us));
	while( delay --);
}
void delay_ms(uint16_t ms){ //mS���뼶��ʱ���򣨲ο�ֵ������ʱ�������ֵ65535��
	while( ms-- != 0){
		delay_us(1000);	//����1000΢�����ʱ
	}
}
